Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add specs to cover the bug 9573 #879

Closed
wants to merge 2 commits into from
Closed

Add specs to cover the bug 9573 #879

wants to merge 2 commits into from

Conversation

sergio-hilgert
Copy link

@sergio-hilgert sergio-hilgert commented Oct 15, 2021

Issue #823

Add specs to the bug https://bugs.ruby-lang.org/issues/9573

@sergio-hilgert sergio-hilgert changed the title Add specs to feature 9573 Add specs to cover the bug 9573 Oct 15, 2021

A.include B1
B1.include C2
A.ancestors.should == [A, B1, C2, Object, ModuleSpecs::IncludedInObject, PP::ObjectMixin, Kernel, BasicObject]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to only check the first 4 ancestors here, since there can be various modules included in Object and that we can't test here easily.
I think something like [A, B1, C2] + Object.ancestors is nice.

@@ -99,3 +99,57 @@ module ModuleSpecs::Modules::Klass; end
d.name.should == "ModuleSpecs_CS2::D"
end
end

ruby_version_is "3.0" do
describe "Include" do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move these specs to core/module/include_spec.rb and core/module/prepend_spec.rb?
language/ is for syntax, and include/prepend are just regular Ruby methods should should be tested in core/.

@eregon
Copy link
Member

eregon commented Oct 27, 2021

@sHilgert Could you do the suggested changes?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants